import { defineStore } from "pinia"
import {ref} from 'vue'

// 定义 Store 的状态接口
interface State {
  isRunning: boolean
  // ... 其他状态字段
}

// 定义并导出 store
export const useMySettingsStore = defineStore("mysettings", {
  // 定义状态
  state: (): State => ({
    isRunning: false
    // ... 其他状态初始值
  }),

  // 定义 getters
  getters: {
    runningStatus: (state) => state.isRunning
  },

  // 定义 actions
  actions: {
    startRunning() {
      this.isRunning = true
    },
    stopRunning() {
      this.isRunning = false
    },
    toggleRunning() {
      this.isRunning = !this.isRunning
    }
  }
})

